﻿@inherits ErrorBoundaryBase

@if (CurrentException is null)
{
    @ChildContent
}
else if (ErrorContent is null)
{
    <div class="main">
        <div class="header">
            <BitButton OnClick="Recover" IconName="Cancel" Variant="BitVariant.Text" />
        </div>
        <div>
            <img src="/images/error-triangle.svg" />
        </div>
        <h1 class="title">Oops, something went wrong...</h1>
        @if (showException)
        {
            <div class="exception">@CurrentException?.ToString()</div>
        }
        <div class="buttons">
            <BitButton OnClick="Refresh" ButtonStyle="BitButtonStyle.Primary">Refresh</BitButton>
            <BitButton OnClick="GoHome" ButtonStyle="BitButtonStyle.Standard">Home</BitButton>
        </div>
    </div>
}
else
{
    @ErrorContent(CurrentException)
}